﻿package com.views
{
    import com.assist.*;
    import com.assist.view.interfaces.*;

    public class HaloButtleView extends Base implements IView
    {
        private var _haloButtle:IHaloButtle;
        private var _isFirst:Boolean = false;

        public function HaloButtleView()
        {
            return;
        }// end function

        public function show() : void
        {
            loadAssets("HaloButtle", this.render, "光环战绩加载中");
            return;
        }// end function

        private function render() : void
        {
            if (this._haloButtle == null)
            {
                this._haloButtle = _view.getAssetsObject("HaloButtle", "HaloButtle") as IHaloButtle;
            }
            _popup.addView(this, this._haloButtle.content);
            this._haloButtle.onClose = function () : void
            {
                close();
                return;
            }// end function
            ;
            this._haloButtle.clientUrl(URI.assetsUrl);
            if (this._isFirst == false)
            {
                this._haloButtle.init();
                this._isFirst = true;
            }
            else
            {
                this._haloButtle.langInit();
            }
            return;
        }// end function

        public function close() : void
        {
            this._haloButtle.clear();
            _popup.closeView(this);
            return;
        }// end function

        public function clear() : void
        {
            return;
        }// end function

    }
}
